__author__ = 'wangleijie'

from SocketServer import TCPServer, StreamRequestHandler

class Handler(StreamRequestHandler):
    def handle(self):
        addr = self.request.getpeername();
        print "Got connection from", addr
        self.wfile.write("thanks you for conect");


server = TCPServer(("", 1234), Handler)
server.serve_forever();
